Report for answering 2nd Part of Capstone Project (Full Report)

Capstone Project - Week 2 (Full Report)

Table of Contents

Introduction: Business Problem

This project attempts to examine a city (NYC) to find an optimal neighborhood for opening a mexican restaurant.

New York City(pre-COVID) is a city bustling with restaurants and pedestrian traffic. The code will examine data to find a location that is based on the following criteria:

  • A new restaurant prefers to be opened near other restaurants. (Restaurants prefer to be clustered together rather than isolated)
  • Restaurants prefer to be near a strong customer "draw" (E.g. a School, Office District, major venue: stadium, theatre)
  • Restaurants prefer to be the only restuarant of its type in neighborhood (e.g. A mexican restaurant would not want to be near another mexican restaurant.)

Data

This where you will type up your discussion of the data e en before you get into the code!! Based on the criteria discussed in the introduction, the data collected would be a datasets consisting of all venues in the NYC area, broken down into smaller manageable datasets.

The data will be collected using the FourSquare API. All coordinates would be looked up and pandas would be created based on data returned by API. Additionally, maps and other visualization tools would be utilize to assit in making a decision on the best locations for opening a Mexican Restaurant. (All the code for this project is located after this report)

There would be an initial grab of all the venues and this would be filtered out into relevant subsets.

Methodology

The newyork_data.json file is used as a starting source for this project instead of the google maps API. This json data is then loaded into a dataframe. Initially, it contains information on all the neighborhoods in all the NY boroughs. This data is filtered down to focus only on Manhattan neighborhoods (with their respective coordinates.

A pre-written function is used to iterate through the filtered manhattan_data dataset whilst making calls to the FourSquare API to generate a new dataset (manhattan_venues) which contains all the venues located in the FourSquare dataset for Manhattan.

This data is the manipulated and cleaned to produce subsets of data that includes only restaurant as the category and also more specifically only MEXICAN restaurants. These datasets would then serve as our primary data source for visualizing and making decisions about possible good locations to open a Mexican Restaurant in Manhattan.

Results

The following images are generated as part of the visualization of data collected.

Image showing Restaurants in Manhattan (Map 1)

Blue dots are Mexican Restaurants. Red Dots are non-Mexican Restaurants image.png

The following image shows the concentration of Mexican restaurants. (Map 2)

image.png

The following image shows the KMeans clustering data. (Map 3)

image.png

Discussion

Preliminary data suggest that an ideal location for opening a Mexican Restaurant would be the lower Westside and/or West Mid-town. (See Map 2). Map 1 shows the occurence of other restaurants (red dots) in comparison with mexican restaurant(blue dots).

There are restaurant concentrations in the lower West side and West Mid-Town areas of Manhattan making it suitable to meet our criteria established earlier, that restaurants prefer to be located near other restaurants. These areas also meet the criteria of not having a mexican restaurant nearby.

Conclusion

Here is your conclusion CELL for discussion This preliminary report points to the lower and mid westside districts to be ideal locations for opening a mexican restaurant that would meet the criteria established above. Further Cluster 0 (red dots) and Cluster 1 (purple dots) appear to be the most likely cluster that a new mexican restaurant would fall into. (See map 3).

By altering the coordinates for the starting city, e.g. using Brooklyn instead of Manhattan, a similar preliminary analysis can be generated for the borough of Brooklyn. Additionally, by substituting 'Mexican Restaurant' with some other restaurant type 'Italian Restaurant' can yield a similar analysis and come up with an ideal location for starting a new restaurant of that type. This report would be presented as an HTML file.